using System.IO;
using Expect.Core.IO;

namespace Expect.Core.Interfaces
{
    /// <summary>
    /// Service contract for reading a specification
    /// </summary>
    public interface ISpecificationReader
    {
        /// <summary>
        /// Read a specification from the provided stream
        /// </summary>
        /// <param name="inputname">name of the input, for example, file name without extension</param>
        /// <param name="s">the stream providing the specification</param>
        /// <returns>spec definition</returns>
        ParsingResult ReadSpecification(string inputname, Stream s);

        /// <summary>
        /// Read a specification from the provided string
        /// </summary>
        /// <param name="inputname">name of the input, for example, file name without extension</param>
        /// <param name="s">the string representation of the specification</param>
        /// <returns>spec definition</returns>
        ParsingResult ReadSpecification(string inputname, string s);
    }
}